* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
.header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    align-items: center;
    height: 60px;
}

.logo h1 {
    font-size: 24px;
    color: #07111b;
}

.nav {
    margin-left: 40px;
}

.nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav ul #navCategories {
    display: flex;
    list-style: none;
}

.nav ul li {
    margin-right: 10px;
}

.nav ul li a {
    text-decoration: none;
    color: #07111b;
    padding: 0 20px;
    font-size: 16px;
}

.nav ul li a.active,
.nav ul li a:hover {
    color: #f01414;
}

.search {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.search input {
    width: 240px;
    height: 36px;
    padding: 0 15px;
    border: 1px solid #e8e8e8;
    border-radius: 18px;
    outline: none;
}

.search button {
    margin-left: 10px;
    height: 36px;
    padding: 0 20px;
    background-color: #f01414;
    color: #fff;
    border: none;
    border-radius: 18px;
    cursor: pointer;
}

/* Main Content Styles */
.main {
    margin-top: 80px;
    padding: 20px 0;
}

.course-categories {
    background-color: #fff;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.course-categories h2 {
    font-size: 18px;
    margin-bottom: 15px;
}

.course-categories ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.course-filter {
    background-color: #fff;
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.course-filter a {
    text-decoration: none;
    color: #666;
    margin-right: 20px;
}

.course-filter a.active {
    color: #f01414;
}

.course-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    padding: 20px;
}

.course-card {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.course-card .course-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.course-card .color-placeholder,
.course-card .course-image {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-card .course-image {
    object-fit: contain;
    background-color: #eaeaea;
    padding: 20px;
}

.course-card .color-placeholder {
    color: white;
    font-size: 18px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    padding: 10px;
    text-align: center;
    word-break: break-word;
}

.course-info {
    padding: 15px;
}

.title-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.course-title {
    font-size: 16px;
    margin-bottom: 10px;
    color: #07111b;
    flex: 1;
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    opacity: 0.6;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    opacity: 1;
}

.copy-icon {
    font-size: 16px;
}

.course-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 12px;
}

/* 复制成功提示 */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    z-index: 1000;
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, 20px); }
    20% { opacity: 1; transform: translate(-50%, 0); }
    80% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -20px); }
}

/* Footer Styles */
.footer {
    background-color: #07111b;
    color: #fff;
    padding: 20px 0;
    text-align: center;
    margin-top: 40px;
}

@media (max-width: 1400px) {
    .course-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .course-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .course-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .course-container {
        grid-template-columns: 1fr;
    }
}
